#ifndef __DEVICE_H
#define __DEVICE_H

#include <vfs/dir.h>
#include <driver.h>

#define BUS_PCI	1
#define BUS_ISA	2

/* device */
typedef struct dev_p
{
	char name[32];
	
	char class[32];
	char class_desc[32];

	uint8_t bus_type;
	void *pci_dev;
	
	drv_t *drv;
	
	struct dev_p *next;
} dev_t;


dev_t *devlist;

int dev_init();
int dev_readdir(int i, struct dirent_t *entry);
dev_t *dev_iget(int i);
int dev_probe();

#endif
